package com.ddone.transaction.annotation.advice;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author ddone
 * @date 2024/3/20-18:39
 */
@Aspect
@Component
@Slf4j
public class LogService {

    @Before("com.ddone.transaction.annotation.advice.TxPointCut.logPointCut()")
    public void beforeTx() {
        log.warn("==========转账业务开始=========");
    }

    @After("com.ddone.transaction.annotation.advice.TxPointCut.logPointCut()")
    public void afterTx() {
        log.warn("==========转账业务结束=========");
    }
}
